namespace Cos.Core.NHibernate
{
    public class ElementDataModel
    {

        public virtual string ElementFile { get; set; }

        public virtual string ElementFilePreview { get; set; }

        public virtual int Id { get; set; }

        public virtual string ElementValue { get; set; }

        public virtual string ElementValuePreview { get; set; }

        public virtual int PageId { get; set; }

        //public virtual int NavId { get; set; }

        //public virtual string CultureCode { get; set; }

        // public virtual PageDataModel Page { get; set; }

        // public virtual PartDataModel Part { get; set; }

        public virtual int PartId { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as ElementDataModel;

            return model != null && this.Id == model.Id;
        }

        public override int GetHashCode()
        {
            return this.Id;
        }
    }
}